﻿<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
    <title>首页</title>
</head>
<body>
	<table width="100%" border="0" cellspacing="0" cellpadding="10">
		<tr>
			<td align="center" valign="top">
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableTit">
					<tr>
						<th valign="bottom" scope="col" style="height: 20px">
							<img src="images/sferx/ml.gif" width="16" height="16" hspace="10" align="absbottom" /><a
								href="Page/Notice/ClassifyNoticeList.aspx">公告</a>
						</th>
						<th valign="bottom" style="text-align: right; height: 20px;">
							<a href="Page/Notice/ClassifyNoticeList.aspx">更多</a>
						</th>
					</tr>
					<tr>
						<td colspan="2">
							<table width="100%" id="tb-message" border="0" align="left" cellpadding="3" cellspacing="0" class="w-table1"></table>
						</td>
					</tr>
				</table>
				<div id="divBlank" runat="server" visible="false" style="height: 20px;">
					&nbsp;</div>
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableTit">
					<tr>
						<th valign="bottom" scope="col" colspan="2">
							<img src="images/sferx/chart2.gif" width="16" height="16" hspace="10" align="absbottom" /><a
								href="#" onclick="TranferToCallManagement();">自我管理报表</a></th>
					</tr>
					<tr>
						<td align="center" width="50%">
							<div id="chartHolder1"></div>
						</td>
						<td align="center" width="50%">
							<div id="chartHolder2"></div>
						</td>
					</tr>
				</table>
			</td>
			<td width="200" valign="top">
				<div class="divBtn" onmouseover="this.style.background='url(images/sferx/icoBtnBG.png) no-repeat'"
					onmouseout="this.style.background='url(images/sferx/icoBtnBG1.png) no-repeat';"
					style="height: 60px; cursor: hand;" onclick="yibiaopan_Click(this);">
					<table width="100%" border="0" cellspacing="0" cellpadding="5">
						<tr>
							<td width="60" align="center" scope="col">
								<img src="images/sferx/ico01.png" width="50" height="50" /></td>
							<td scope="col">
								<strong>仪表盘</strong><br />
								Dashboard</td>
						</tr>
					</table>
				</div>
				<div class="divBtn" onmouseover="this.style.background='url(images/sferx/icoBtnBG.png) no-repeat'"
					onmouseout="this.style.background='url(images/sferx/icoBtnBG1.png) no-repeat';"
					style="height: 60px; cursor: hand;" onclick="RegularReport_Click_New(this);">
					<table width="100%" border="0" cellspacing="0" cellpadding="5">
						<tr>
							<td width="60" align="center" scope="col">
								<img src="images/sferx/ico07.png" width="50" height="50" /></td>
							<td scope="col">
								<strong>常用报表</strong><br />
								Regular Report</td>
						</tr>
					</table>
				</div>
				<div class="divBtn" onmouseover="this.style.background='url(images/sferx/icoBtnBG.png) no-repeat'"
					onmouseout="this.style.background='url(images/sferx/icoBtnBG1.png) no-repeat';"
					style="height: 60px; cursor: hand;" onclick="GoToUrl('http://www.myxjp.com');">
					<table width="100%" border="0" cellspacing="0" cellpadding="5">
						<tr>
							<td width="60" align="center" scope="col">
								<img src="images/sferx/ico05.png" width="50" height="50" /></td>
							<td scope="col">
								<strong>公司外网</strong><br />
								Website</td>
						</tr>
					</table>
				</div>
				<div class="divBtn" onmouseover="$(this).css({'background':'url(images/sferx/icoBtnBG.png) no-repeat'})"
					onmouseout="this.style.background='url(images/sferx/icoBtnBG1.png) no-repeat';"
					style="height: 60px; cursor: hand;" onclick="page_panel('sfe_home_a5','SFEMain.html')">
					<table width="100%" border="0" cellspacing="0" cellpadding="5">
						<tr>
							<td width="60" align="center" scope="col">
								<img src="images/sferx/ico06.png" width="50" height="50" /></td>
							<td scope="col">
								<strong>资料中心</strong><br />
								Information Center</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>
	<div id="createContainer"></div>
	<!-- svg图表  supports Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+ and Internet Explorer 6.0+ -->
	<script type="text/javascript" src="js/dwz/chart/raphael.js"></script>
	<script type="text/javascript" src="js/dwz/chart/g.raphael.js"></script>
	<script type="text/javascript" src="js/dwz/chart/g.bar.js"></script>
	<script type="text/javascript" src="js/dwz/chart/g.pie.js"></script>
	<!---->
	<style type="text/css">		
		.c-b{ color:#0066cc;}
		
		.w-l{ float:right;}
		
		.w-table1{ border:1px solid #999; border-left:none; border-right:none; border-top:none;margin-top:25px}
		
		.w-table1 td{ border-top:1px solid #ccc; text-align:left; padding-left:10px;}
		
		.w-table1 th{ height:40px; font-weight:normal; color:#999; text-align: left; padding-left:10px;}
		
		.tableTit a{ color:#666; text-decoration: none;}

		.tableTit a:hover{ color:#0066cc;}
		
		.tableTit {
			margin-top:5px;
		}
		.tableTit th {
			padding-bottom:3px;
			border-bottom:#ccc 1px solid;
			font-size:12px;
			font-weight:bold;
			color:#666;
			text-align:left;
		}
		.tableTit th a {
			color:#666;
			text-decoration:none;
		}
		.tableTit th a:hover {
			color:#000;
		}
		.divBtn {
			margin-top:10px;
			background:url(images/sferx/icoBtnBG1.png) no-repeat;
		}
		.divBtn td {
			font-size:12px;
			color:#333;
		}
		.divBtn td strong {
			font-size:12px;
			color:#000;
			font-weight:bold;
		}
		.westtable-span1 {
			font-family :'宋体'
			font-size: 14px;
			color: #2b5875;
			font-weight: bold;
		}
    </style>
    <script language="javascript">
		var options = {
			stacked: false,
			gutter:20,
			axis: "0 0 1 1", // Where to put the labels (trbl)
			axisystep: 10 // How many x interval labels to render (axisystep does the same for the y axis)
		};
		
		$(function() {
			// Creates canvas
			var r = Raphael("chartHolder1");
			var data = [[10,20,30,50],[15,25,35,50]]
			
			// stacked: false
			var chart1 = r.barchart(40, 10, 320, 220, data, options).hover(function() {
				this.flag = r.popup(this.bar.x, this.bar.y, this.bar.value).insertBefore(this);
			}, function() {
				this.flag.animate({opacity: 0}, 500, ">", function () {this.remove();});
			});
			chart1.label([["A1",  "A2", "A3", "A4"],["B1",  "B2", "B3", "B4"]],true);
			
			
			// stacked: true
			options.stacked=true;
		});
		
		/* Title settings */		
		title = "October Browser";
		titleXpos = 390;
		titleYpos = 85;

		/* Pie Data */
		pieRadius = 130;
		pieXpos = 150;
		pieYpos = 180;
		pieData = [1149422, 551315, 172095, 166565, 53329, 18060, 8074, 1941, 1393, 1104, 2110];
		pieLegend = [
		"%%.%% – Firefox", 
		"%%.%% – Internet Explorer", 
		"%%.%% – Chrome", 
		"%%.%% – Safari", 
		"%%.%% – Opera", 
		"%%.%% – Mozilla", 
		"%%.%% – Mozilla Compatible Agent", 
		"%%.%% – Opera Mini", 
		"%%.%% – SeaMonkey", 
		"%%.%% – Camino", 
		"%%.%% – Other"];

		pieLegendPos = "east";

		$(function () {
			var r = Raphael("chartHolder2");
			 
			r.text(titleXpos, titleYpos, title).attr({"font-size": 20});
			
			var pie = r.piechart(pieXpos, pieYpos, pieRadius, pieData, {legend: pieLegend, legendpos: pieLegendPos});
			pie.hover(function () {
				this.sector.stop();
				this.sector.scale(1.1, 1.1, this.cx, this.cy);
				if (this.label) {
					this.label[0].stop();
					this.label[0].attr({ r: 7.5 });
					this.label[1].attr({"font-weight": 800});
				}
			}, function () {
				this.sector.animate({ transform: 's1 1 ' + this.cx + ' ' + this.cy }, 500, "bounce");
				if (this.label) {
					this.label[0].animate({ r: 5 }, 500, "bounce");
					this.label[1].attr({"font-weight": 400});
				}
			});
			getMessageInfo();
		});	
		
		function getMessageInfo(){
			var paramsstr = "{'employeeid':1}";
			var variable = new Array('__methodName', '__token', 'pagename', 'actionname','__params');
			var value = new Array('wsActionJSON', token, 'p_visitmessage', 'getmessageinfo',paramsstr);
			var dataStr = getJsonData(variable, value);
			connectionServlet(dataStr, getMessageInfoReturn);
		}
		
		function getMessageInfoReturn(data){
			if(data.successflag=="true"){
				var notes = data.result.notes;
				var strHTML = '';
				for(i=0;i<notes.length;i++){
					strHTML += '<tr><td>·<a href="javascript:void(0)" onclick="getMessageDetail('+notes[i].notesid+')">'+notes[i].title+'<span class="c-b w-l">20'+(notes[i].datelastupdated.year-100)+'-'+notes[i].datelastupdated.month+'-'+notes[i].datelastupdated.day+'</span></a></td>';
					i++;
					if(i<notes.length){
						strHTML += '<td>·<a href="javascript:void(0)" onclick="getMessageDetail('+notes[i].notesid+')">'+notes[i].title+'<span class="c-b w-l">20'+(notes[i].datelastupdated.year-100)+'-'+notes[i].datelastupdated.month+'-'+notes[i].datelastupdated.day+'</span></a></td></tr>';
					}
				}
				$("#tb-message").html(strHTML);
			}
		}
		
		function getMessageDetail(notesid){
			paramsstr = "{'notesid':'"+notesid+"','employeeid':1}";
			var variable = new Array('__methodName', '__token', 'pagename', 'actionname','__params');
			var value = new Array('wsActionJSON', token, 'p_visitmessage', 'getmessagedetail',paramsstr);
			var dataStr = getJsonData(variable, value);
			connectionServlet(dataStr, getMessageDetailReturn);
		}	
		
		function getMessageDetailReturn(data){
			if(data.successflag == 'true'){
				$('#createContainer').html('<div id="dlg-message"></div>');
				var pubnotesinfo,pictureinfo;
				var begindate = '',enddate = '',strHTML = '';
				if(data.result.pubnotesinfo!=undefined){
					pubnotesinfo = data.result.pubnotesinfo;
					begindate = '20'+(pubnotesinfo.begindate.year-100)+'-'+pubnotesinfo.begindate.month+'-'+pubnotesinfo.begindate.day;
					enddate = '20'+(pubnotesinfo.begindate.year-100)+'-'+pubnotesinfo.begindate.month+'-'+pubnotesinfo.begindate.day;
				}
				strHTML = '<br><div style="margin:10px;border-top: 1px solid #99BBE8;"><p class="westtable-span1"><span style="width:30px;background:#ffffff;margin-top:-20px;margin-left:5px;float:left">附件</span><table width="100%" class="w-table1" cellpadding="3" cellspacing="0"><tr><td width="8%">序号</td><td>附件名称</td><td>&nbsp;</td></tr>';
				if(data.result.pictures!=undefined){
					pictures = data.result.pictures;
					for(i=0;i<pictures.length;i++){
						strHTML += '<tr><td>&nbsp;'+(i+1)+'</td><td>&nbsp;'+pictures[i].picturename+'</td><td><a onclick="page_download(\'tongzhi.docx\',\'../server/sferx/deploy/oval.war/uploads/tongzhi.docx\')"><input type=button value="下载" style="width:80"></a></td></tr>';
					}
				}
				strHTML += '</table></p></div>';
				$('#dlg-message').dialog({   			
					title: '通知', 
					width: 550,   
					height: 400, 
					modal: true , 
					buttons: [{
						text:'&nbsp;&nbsp;关闭&nbsp;&nbsp;',
						handler:function(){
							$('#dlg-message').dialog('destroy');
						}
					}],
					content: '<div style="margin:10px;padding:5px;border: 1px solid #99BBE8;"><p class="westtable-span1"><span style="width:55px;background:#ffffff;margin-top:-25px;float:left">基本信息</span></p><table width="100%" cellpadding="3" cellspacing="0"><tr><td width="81">标题：</td><td colspan="3">'+pubnotesinfo.title+'&nbsp;</td></tr><tr><td>内容：</td><td colspan="3">'+pubnotesinfo.content+'&nbsp;</td></tr><tr><td>是否公开：</td><td colspan="3">'+pubnotesinfo.ispublic+'&nbsp;</td></tr><tr><td>来源：</td><td>'+pubnotesinfo.fromusername+'&nbsp;</td><td >来源公司：</td><td>'+pubnotesinfo.fromorgshortname+'&nbsp;</td></tr><tr><td>产生日期：</td><td>'+begindate+'&nbsp;</td><td class="td-text" width=80>到期日期：</td><td>'+enddate+'&nbsp;</td></tr></table></div>'+strHTML
				}); 
				$('.dialog-button').css({'background':'#dbeaf9'});
			}
		}
	</script>
</body>
</html>